package com.ncp.servlet.registerlogin;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.ncp.model.biz.registerlogin.RegisterBiz;
import com.ncp.model.entity.registerlogin.UserBasicBean;

public class UpdateInfoServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
            this.doPost(request, response);
		
	}

	
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html");
		request.setCharacterEncoding("UTF-8");
		response.setCharacterEncoding("UTF-8");
		HttpSession session = request.getSession(true);
		String name=(String)session.getAttribute("LoginName");
		RegisterBiz rb = new RegisterBiz();
		List<UserBasicBean> al = rb.getList(name);
		UserBasicBean  ubb = al.get(0);
		request.setAttribute("UserBasicBeanList", ubb);
		request.getRequestDispatcher("pages/registerlogin/modifyregister.jsp").forward(request, response);
	}

}
